import api from '../http'

export const getTeamListForPage = (queryForm) => {
	return api.http({
		url:'/shop/team/list/page',
		method:'get',
		params:queryForm
	})
}

export const getTeamUserList = (id) => {
	return api.http({
		url:`/shop/team/list/user/team_id/${id}`,
		method:'get'
	})
}



export const getTeamListAlive = () => {
	return api.http({
		url:'/shop/team/list/alive',
		method:'get'
	})
}

export const insertTeam = (addForm) => {
	return api.http({
		url:'/shop/team/insert',
		method:'put',
		data:addForm
	})
}

export const findTeamById = (id) => {
	return api.http({
		url:`/shop/team/find/id/${id}`,
		method:'get',
		data:id
	})
}

export const updateTeam = (addForm) => {
	return api.http({
		url:`/shop/team/update`,
		method:'put',
		data:addForm
	})
}

export const deleteTeamById = (id) => {
	return api.http({
		url:`/shop/team/delete/id/${id}`,
		method:'delete',
	})
}

export const setTeamIsOnSale = (params) => {
	return api.http({
		url:`/shop/team/set/onsale`,
		method:'get',
		params:params
	})
}